# -*- coding:utf-8 -*—
import os

import pandas as pd


def jsonToExcel(jsonpath):
    df = pd.read_json(io=jsonpath, lines=True)
    exportPath = os.path.split(os.path.abspath(jsonpath))[0]
    outputPath=exportPath + './json转excel.xlsx'
    df.to_excel(outputPath)


if __name__ == '__main__':
    jsonPath="F:/玖天气象预报9月全月累积降雨（短期+中期+长期）第1个单元格左下角.json"
    jsonToExcel(jsonPath)
